#ifndef _ALGA_AMD_EVERGREEN_IOCTL_H
#define _ALGA_AMD_EVERGREEN_IOCTL_H
/*
  author Sylvain Bertrand <digital.ragnarok@gmail.com>
  Protected by GNU Affero GPL v3 with some exceptions.
  See README at root of alga tree.
*/
#define EVERGREEN_NOP			0

#define EVERGREEN_DCE_DPS_INFO		1
#define EVERGREEN_DCE_DP_SET		2
#define EVERGREEN_DCE_DP_DPM		3
#define EVERGREEN_DCE_PF		4
#define EVERGREEN_MEM_ALLOC		5
#define EVERGREEN_MEM_FREE		6
#define EVERGREEN_INFO			7

struct evergreen_dce_dps_info {
	unsigned used;
	unsigned connected;
	enum alga_pixel_fmt pixel_fmts[CRTCS_N_MAX][ALGA_PIXEL_FMTS_MAX];
	struct alga_timing timings[CRTCS_N_MAX][ALGA_TIMINGS_MAX];
};

struct evergreen_dce_dp_set {
	unsigned i;
	uint64_t primary;
	uint64_t secondary;
	enum alga_pixel_fmt pixel_fmt;
	struct alga_timing timing;
	unsigned pitch;
};

struct evergreen_mem {
	union {
		uint64_t gpu_addr;	/* output */
		struct {		/* input */
			uint64_t sz;
			uint64_t align;
		};
	};
};

#ifndef __KERNEL__
#define EVERGREEN_GPU_PAGE_SZ 4096
#endif
#endif
